package com.winbomb.simulife.impl;

import com.winbomb.simulife.Master;
import com.winbomb.simulife.World;
import com.winbomb.simulife.base.CardType;
import com.winbomb.simulife.base.ICard;
import com.winbomb.simulife.base.IChoice;
import com.winbomb.simulife.framework.Pixmap;
import com.winbomb.simulife.game.Assets;

public abstract class BaseCard implements ICard {

	private int openStatus;
	protected World world;
	protected Master master;

	public BaseCard(World world) {
		this.world = world;
		this.master = world.getMaster();
		this.openStatus = ICard.CLOSED_STATUS;
	}

	@Override
	public Pixmap getCardIcon() {

		CardType type = getCardType();

		if (type == CardType.LEARN) {
			return Assets.card_learn;
		} else if (type == CardType.SPORTS) {
			return Assets.card_sports;
		} else if (type == CardType.AMUSE) {
			return Assets.card_amuse;
		} else if (type == CardType.TALENT) {
			return Assets.card_talent;
		}

		return Assets.card_learn;
	}

	@Override
	public IChoice[] getChoices() {
		return null;
	}

	@Override
	public int getOpenStatus() {
		return this.openStatus;
	}

	@Override
	public void setOpenStatus(int openStatus) {
		this.openStatus = openStatus;
	}

	@Override
	public boolean isEnable() {
		return true;
	}

	public abstract CardType getCardType();

}
